package com.shuqi.common;

import java.text.DecimalFormat;

import android.R.integer;

import com.shuqi.controller.R;

public class Constant {

    public static final boolean DEBUG = false;

    /** 书籍类型：收费 (老板net，现版收费) */
    public static final int BOOKTYPE_PAY = 1;// 1,7,9(对应BookMarkHelper 书签字段)
    /** 书籍类型：神马 (网页跳转过来的阅读类型) */
    public static final int BOOKTYPE_NET = 2;// 8(APP)
    /** 书籍类型：Txt */
    public static final int BOOKTYPE_TXT = 3;// 4
    /** 书籍类型：ucTxt */
    @Deprecated
    public static final int BOOKTYPE_UCTXT = 4;//
    /** 书籍类型：umd */
    public static final int BOOKTYPE_UMD = 5;// 4
    /** 书籍类型：epub */
    public static final int BOOKTYPE_EPUB = 6;// 4
    /** 书籍类型：书包 */
    public static final int BOOKTYPE_BAG = 7;// 3

    /** 书籍类型：进入购买订单 */
    public static final int BOOKTYPE_ORDER_PAY = 8;

    /** 书籍收费类型：按章免费 */
    public static final int PAYMODE_FREE = 0;
    /** 书籍收费类型：全本收费 */
    public static final int PAYMODE_BOOK = 1;
    /** 书籍收费类型：按章收费 */
    public static final int PAYMODE_CHAPTER = 2;
    /** 书籍收费类型：全本免费 */
    public static final int PAYMODE_BOOK_FREE = 3;

    /**
     * 编码格式-GB2312
     */
    public static final String CHARSET_GB2312 = "GB2312";
    /**
     * 编码格式-UTF-8
     */
    public static final String CHARSET_UTF_8 = "UTF-8";
    /**
     * 编码格式-UTF-16LE
     */
    public static final String CHARSET_UTF_16LE = "UTF-16LE";
    /**
     * 编码格式-UTF-16BE
     */
    public static final String CHARSET_UTF_16BE = "UTF-16BE";

    /** 读取MappedByteBuffer 长度 */
    public static final int READ_BYTEBUFFER_LENTH = 1024 * 20;

    public static final int READ_BYTEBUFFER_LENTH_40 = 1024 * 40;// 7.3.8 判断txt目录某章节过大的标记字节

    public static final int READ_BUYBUTTON_TEXT_COLORS[] = {0xffffffff, 0xffffffff, 0xffffffff,
            0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4b278};
    /**
     * 小说背景背后颜色集 几种主题模式数组中对应几个颜色值
     */
    public static final int[] BACK_BG_COLORS = {0XFFFAF7EF, 0XFFD7C3A2, 0XFFDBEFDA, 0XFF87A7B2,
            0XFF879AB2, 0XFFF2E0CD, 0XFFB8929C, 0XFF3D3F41, 0xFF2c2c2c};
    /**
     * loading背景的颜色
     */ 
    public static final int[] READ_LOAD_COLORS = {0XFFFAF7EF, 0XFFD9CCB4, 0XFFDBEFDA, 0XFF87A7B2,
            0XFF879AB2, 0XFFF2E0CD, 0XFFB8929C, 0XFF3D3F41, 0xFF2c2c2c};
    /**
     * 阅读页目录对应的颜色
     */
    public static final int[] CATLOG_BG_COLORS = {0XFFFAF7EF, 0XFFDBC8A7, 0XFFDBEFDA, 0XFF87A7B2,
            0XFF879AB2, 0XFFF2E0CD, 0XFFB8929C, 0XFF3D3F41, 0xFF2c2c2c};

    /**
     * 阅读页购买包
     */
    public static final int[] CATLOG_BUY_ICON = {R.drawable.icon_bookditeails_catalog_buy0,
            R.drawable.icon_bookditeails_catalog_buy1, R.drawable.icon_bookditeails_catalog_buy2,
            R.drawable.icon_bookditeails_catalog_buy3, R.drawable.icon_bookditeails_catalog_buy4,
            R.drawable.icon_bookditeails_catalog_buy5, R.drawable.icon_bookditeails_catalog_buy6,
            R.drawable.icon_bookditeails_catalog_buy7, R.drawable.icon_bookditeails_catalog_buy8};
    /**
     * 阅读页对应的各种字体颜色
     */
    public static final int[] READ_FONT_COLORS = {0xFF4e4d4d, 0xFF443726, 0xFF424b41, 0xFFffffff,
            0xFFffffff, 0xFF4d463d, 0xFFffffff, 0xFFb0b6bb, 0xFF565656};
    /**
     * 阅读页标题，电池，百分比的颜色
     */
    public static final int[] READ_OTHER_COLORS = {0xff8a8a8a, 0xff7d6f5e, 0xff849783, 0xffd2dce0,
            0xffd2d8df, 0xff9e9287, 0xffe1d5d8, 0xff8c9093, 0xff464646};
    /**
     * 阅读页目录的未缓存章节颜色
     */
    public static final int[] CATLOG_NO_COLORS = {0xFFa9a7a0, 0xFF7d6f5e, 0xFF849783, 0xFFd2dce0,
            0xFFd2d8e0, 0xFF9e9287, 0xFFe1d5d8, 0xFF75787b, 0xFF3f3f3f};
    /**
     * 阅读页目录分隔线
     */
    public static final int[] CATLOG_DV_LINE = {R.drawable.common_imaginary_line,
            R.drawable.common_imaginary_line, R.drawable.common_imaginary_line,
            R.drawable.common_imaginary_line, R.drawable.common_imaginary_line,
            R.drawable.common_imaginary_line, R.drawable.common_imaginary_line,
            R.drawable.common_imaginary_line, R.drawable.common_imaginary_line_night};
    /**
     * 购买标题的颜色
     */
    public static final int[] READ_TITLE_COLORS = {0xff494949, 0xff443726, 0xff424b41, 0xffffffff,
            0xffffffff, 0xff4d463d, 0xffffffff, 0xffb0b6bb, 0xff565656};
    /**
     * 购买提示的颜色
     */
    public static final int[] READ_TOAST_COLORS = {0xffb7b4ae, 0xff7c6a53, 0xff99ae98, 0x7fffffff,
            0x7fffffff, 0xffaea296, 0x7fffffff, 0xff7f8285, 0xff404040};
    /**
     * 阅读页右面的色条的色值
     */
    public static final int[][] READ_RIGHT_COLORS = { {0xe0bdb9af, 0x00faf7ef},
            {0xe087765b, 0x00d7c2a5}, {0xe0a1b5a0, 0x00cee2cd}, {0xe05c7882, 0x007e9ea9},
            {0xe0627183, 0x007e91a9}, {0xe0b0a394, 0x00ecdac7}, {0xe08e6b74, 0x00b28c96},
            {0xe0292a2c, 0x0037393b}, {0xe01f1f1f, 0x002c2c2c}};

    /** 阅读页目录报错页图片 */
    public static final int[] CATALOG_NO_DATA_IMAGE = {R.drawable.limit_nodata0,
            R.drawable.limit_nodata1, R.drawable.limit_nodata2, R.drawable.limit_nodata3,
            R.drawable.limit_nodata4, R.drawable.limit_nodata5, R.drawable.limit_nodata6,
            R.drawable.limit_nodata7, R.drawable.limit_nodata_night};

    /** 阅读页目录报错页文字颜色 */
    public static final int[] CATALOG_NO_DATA_TEXT = {0xff817f79, 0xff7e715b, 0xff6a7669,
            0xff526870, 0xff475362, 0xff847c73, 0xff614b50, 0xff656a6f, 0xff3a3a3a};
    // ================================

    /**
     * 阅读页展开箭头
     */
    public static final int[] CATLOG_EXPEND_ICON = {R.drawable.icon_bookditeails_catalog_expend0,
            R.drawable.icon_bookditeails_catalog_expend1,
            R.drawable.icon_bookditeails_catalog_expend2,
            R.drawable.icon_bookditeails_catalog_expend3,
            R.drawable.icon_bookditeails_catalog_expend4};

    /**
     * 阅读页未展开箭头
     */
    public static final int[] CATLOG_UNEXPEND_ICON = {
            R.drawable.icon_bookditeails_catalog_unexpend0,
            R.drawable.icon_bookditeails_catalog_unexpend1,
            R.drawable.icon_bookditeails_catalog_unexpend2,
            R.drawable.icon_bookditeails_catalog_unexpend3,
            R.drawable.icon_bookditeails_catalog_unexpend4};

    /**
     * 是否显示边缘书边 默认显示
     */
    public final static boolean ISSHOWBOOKSIDE = false;

    /** 曾经浏览条目数 */
    public static final int MIX_BrowsingHistory_COUNT = 30;
    /** 菜单一级布局 */
    public static final int MENU_FIRST_LAYOUT = 0;
    /** 菜单二级布局:更多设置 */
    public static final int MENU_SECOND_LAYOUT = 1;
    /** 菜单二级布局:进度 */
    public static final int MENU_THIRD_LAYOUT = 2;
    /* 顶部滑动导航 */
    /** 推荐/封面/最热 */
    public static final int SLIDING_0 = 0;
    /** 排行/目录/完结 */
    public static final int SLIDING_1 = 1;
    /** 分类/最新 */
    public static final int SLIDING_2 = 2;
    /** 限免 */
    public static final int SLIDING_3 = 3;
    /** 阅读页(BookContentInfo params) Bundle key */
    public static final String BOOKCONTENT_BUNDLE_KEY = "params";

    /** 游客默认用户ID */
    public static final String GUEST_USER_ID = "8000000";

    /** 百分比的格式 */
    public static final DecimalFormat PERCENT_FORMAT = new DecimalFormat("#0.0");
    public static final DecimalFormat PERCENT_FORMAT1 = new DecimalFormat("#0.00");

    /** 订单页请求充值requestCode */
    public static final int ORDER_REQUESTCOD = 50;
    /** 阅读页订单 ，购买按钮soureID */
    public static final int[] ORDER_BUY_BUTTON_ID = {R.drawable.btn_night_orange,
            R.drawable.btn_common_orange_n};// 0,夜间；1,日间
    /** 阅读页目录页书签图片 */
    public static final int[] CATALOG_BOOKMARK_IMAGE = {R.drawable.icon__catalog_bookmark_night,
            R.drawable.icon__catalog_bookmark};// 0,夜间；1,日间
    /** 阅读页目录页快速滑动图片 */
    public static final int[] CATALOG_BOOKMARK_FAST_BAR_IMAGE = {R.drawable.fast_bar_night,
            R.drawable.fast_bar_normal};// 0,夜间；1,日间


    /** 用于bundle传递cid参数 */
    public static final String FRAGMENTARGUSPARAMKEY = "FragMentCid";

    /** 阅读页绘制购买按钮时的提示语 */
    public static final String[] BOOKCONTENT_BUY_BUTTON_HINT = {"本书内容需要购买后才能阅读", "联网失败，请检查您的网络",
            "未登录，请登录后购买！", "本书内容已购买,需下载后阅读", "未登录，请登录后购买！", "目录信息获取失败，请稍候重试", "内容获取失败，请稍候重试"};

    /** Notification 通知栏的ID：书籍有更新提醒 */
    public static final int NOTIFICATION_ID_BOOKMARK_HAVEUPDATE = 1000;
    /** Notification 通知栏的ID：下载软件通知栏进度提示 */
    public static final int NOTIFICATION_ID_DOWNLODAPP_UPDATEPERCENT = 1001;
}
